<?php
error_reporting(0);
$isadmin=1;
include_once '../comm/config.php';
include_once '../comm/class_db.php';
include '../comm/checkpostandget.php';
include 'check.php';

$field_arr=$_POST;
$ddusername=$_POST['ddusername'];
$field_arr=empty2zero($field_arr,array('money','dengji','hart',));

if($_POST['ddpassword']=="duoduo123.com"){
	unset($field_arr['ddpassword']);
	update_sql('user',$field_arr,"ddusername='".$ddusername."'",0);
}
else{
    $field_arr['ddpassword']=md5($_POST['ddpassword']);
    update_sql('user',$field_arr,"ddusername='".$ddusername."'",0);
    if(UC==1){
        include '../data/config.inc.php';
        include '../uc_client/client.php';
	    $uc_name=iconv("utf-8","utf-8",$ddusername);
        $ucresult = uc_user_edit($uc_name,'',$_POST['ddpassword'],'',1);
	    if($ucresult<0){
		    echo "失败,错误编号：".$ucresult;
	        exit;
	    }
    }
}
admin_log('修改会员信息');
alert('保存成功！',-2);   
mysql_close();
?>